{{#extends @html/layouts/layout-standart.html}}

<!-- действия -->
{{:action_community}}{{/}}{{community.url}}/showfeed{{/:action_community}}

{{:init}}
	{{@community.html:init}}
	{{!connect "screen/content-posts.css" media="screen" charset="utf-8"}}
	{{!connect "screen/content-posts-comments.css" media="screen" charset="utf-8"}}
	{{!connect "screen/widgets-default.css" media="screen" charset="utf-8"}}

	{{!connect "jquery.js" pos="top"}}

	{{!connect "misc.js"}}

	<!-- Для типа документа картинка, модная перключалка -->
	{{!connect "imageswitcher.js"}}
	{{!connect "ImageSwitcherView.js"}}

	{{!connect "feed.js"}}

{{/:init}}

{{:content_class}}content-posts{{/:content_class}}

{{:layout_right}}
	{{tags}}
{{/:layout_right}}

{{:layout_main}}
<!-- ========================= Установки для работы js ============== -->
<!-- для imageswitcher.js -->
{{@html/config/imageswitcher.html}}
<a href="{{ajax_url}}" id="feed_url"></a>
<a href="{{items_remaining}}" id="items_remaining"></a>
<!-- ========================= Установки для работы js ============== -->
	<h1 class="title-">{{@:title}}</h1>
	<div class="list-" id="itemslist">
		{{@:itemslist}}{{:itemslist}}
			{{!for items do=@:blogitemblock}}
		{{/:itemslist}}
	</div>
{{/:layout_main}}

{{:layout_pager}}
	<ul class="pagenavigation-">
		<li>{{!!a href=prev_url}}← Следующая страница{{/!!}}</li>
		<li>{{!!a href=next_url}}Предыдущая страница →{{/!!}}</li>
	</ul>
{{/:layout_pager}}

{{:blogitemblock}}
<div class="item- js-post" id="i{{*post.oid}}">
	<!-- issue -->
	{{?*platonicaid_author}}
		{{@:author author=*platonicaid_author}}
	{{?:}}
		{{@:author author=*poster}}
	{{/?}}
	{{!doctype @html/doctypes/feed/__DOCTYPE__.html *post.type}}
	{{?*tags}}
	<ul class="tags-">
		<li class="hdr-">Тематика записи:</li>
		{{!for *tags do=@:tag}}
		{{:tag *is_current}}<li>{{*title}}{{?!For.last}},{{/?}}</li>{{/:tag}}
		{{:tag}}<li><a href="?tag={{*title|escape type='url'}}" title="Выбрать все записи с меткой &laquo;{{*title}}&raquo;">{{*title}}</a>{{?!For.last}},{{/?}}</li>{{/:tag}}
	</ul>
	{{/?}}

	<!-- блок комментов (добавьте в родительский тег class="js-post" и id="i{{post_oid}}") -->
	{{@html/comments/comments.html:main item=*}}

	{{?*post.edited_user_oid}}
	<br clear="left" />
	Исправлено {{*post.edited_dtime|date "%d %M %Y, в %H:%i"}}
	<a href="{{/}}{{*community.community_url}}/members/{{*post.edited_user_oid}}">{{*post.edited_user.fullname}}</a>
	{{/?}}
</div>
{{/:blogitemblock}}

<!-- Блок автора записи -->
{{:author}}
<div class="author-">
	{{?author.oid}}
		<!-- registered -->
	<a href="{{?!author.url}}{{/}}{{*community.url}}/members/{{author.oid}}{{?:}}{{author.url}}{{/?}}">
		{{?!author.avatar_url}}
		<img src="{{?author.avatar}}{{/}}{{!link_to author.avatar 'imagestorage' 'sm1'}}{{?:}}{{images}}avatar-48x48.png{{/?}}" class="avatar-" />{{?:}}<img src="{{author.avatar_url}}" class="avatar-" />{{/?}}
		</a>
	<a href="{{?!author.url}}{{/}}{{*community.url}}/members/{{author.oid}}{{?:}}{{author.url}}{{/?}}" class="name-">{{author.name}}</a>
	{{?author.status}}<div class="status-">{{author.status}}</div>{{/?}}
	{{?:}}
		<!-- anonymous -->
		<img src="{{images}}avatar-48x48.png" class="avatar-" />
		<div class="status-">Платонимус</div>
	{{/?}}
</div>
{{/:author}}

{{:userbarpost}}
<ul class="userbar-">
	<li class="date-">{{*post.ctime|date "%d %M %Y, в %H:%i"}}</li>
	{{?*issue.issue_number}}<li>Опубликовано в <a href="{{/}}{{*community.url}}/{{*post.issue_oid}}/showissue">{{*issue.issue_number}}. {{*issue.issue_name}} ({{*issue.tdi_title}})</a></li>{{/?}}
	{{?*acl.item_edit.is_allowed}}
	<li class="edit-"><a href="{{/}}{{*community.url}}/{{*post.oid}}/edititem">Редактировать</a></li>
	{{/?}}
	{{?*acl.item_delete}}
	<li class="delete-"><a href="{{/}}{{*community.url}}/{{*post.oid}}/deleteitem">Удалить</a></li>
	{{/?}}
</ul>
{{/:userbarpost}}
